<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>miniFOC: PID_Structure_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Acme_LOGO.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">miniFOC<span id="projectnumber">&#160;1.0.2</span>
   </div>
   <div id="projectbrief">This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle"><div class="title">PID_Structure_t Struct Reference</div></div>
</div><!--header-->
<div class="contents">

<p>structure of PID algorithm  
 <a href="struct_p_i_d___structure__t.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="pid_8h_source.html">pid.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a1f7add0f84d583bc2eceb290d6c4cc06"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#a1f7add0f84d583bc2eceb290d6c4cc06">kp</a></td></tr>
<tr class="memdesc:a1f7add0f84d583bc2eceb290d6c4cc06"><td class="mdescLeft">&#160;</td><td class="mdescRight">proportional term coefficient in PID  <a href="struct_p_i_d___structure__t.html#a1f7add0f84d583bc2eceb290d6c4cc06">More...</a><br /></td></tr>
<tr class="separator:a1f7add0f84d583bc2eceb290d6c4cc06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a050993b7ca6c97e62c1020017f716b91"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#a050993b7ca6c97e62c1020017f716b91">ki</a></td></tr>
<tr class="memdesc:a050993b7ca6c97e62c1020017f716b91"><td class="mdescLeft">&#160;</td><td class="mdescRight">integral term coefficient in PID  <a href="struct_p_i_d___structure__t.html#a050993b7ca6c97e62c1020017f716b91">More...</a><br /></td></tr>
<tr class="separator:a050993b7ca6c97e62c1020017f716b91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7a5c6018507bb1361fcca170e069b9c"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#ae7a5c6018507bb1361fcca170e069b9c">kd</a></td></tr>
<tr class="memdesc:ae7a5c6018507bb1361fcca170e069b9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">differential term coefficient in PID  <a href="struct_p_i_d___structure__t.html#ae7a5c6018507bb1361fcca170e069b9c">More...</a><br /></td></tr>
<tr class="separator:ae7a5c6018507bb1361fcca170e069b9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f567aec72ce48f24c2dbc06dcfa3a09"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">summary</a></td></tr>
<tr class="memdesc:a5f567aec72ce48f24c2dbc06dcfa3a09"><td class="mdescLeft">&#160;</td><td class="mdescRight">value of integral term in PID  <a href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">More...</a><br /></td></tr>
<tr class="separator:a5f567aec72ce48f24c2dbc06dcfa3a09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0e13a810b1a4602c1ce625f9877cbf5"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#ad0e13a810b1a4602c1ce625f9877cbf5">expect</a></td></tr>
<tr class="memdesc:ad0e13a810b1a4602c1ce625f9877cbf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">user expectations in PID  <a href="struct_p_i_d___structure__t.html#ad0e13a810b1a4602c1ce625f9877cbf5">More...</a><br /></td></tr>
<tr class="separator:ad0e13a810b1a4602c1ce625f9877cbf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a466d4dab1bd38a43438c2e5e6ad5534e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#a466d4dab1bd38a43438c2e5e6ad5534e">maximum</a></td></tr>
<tr class="memdesc:a466d4dab1bd38a43438c2e5e6ad5534e"><td class="mdescLeft">&#160;</td><td class="mdescRight">maximum output in PID  <a href="struct_p_i_d___structure__t.html#a466d4dab1bd38a43438c2e5e6ad5534e">More...</a><br /></td></tr>
<tr class="separator:a466d4dab1bd38a43438c2e5e6ad5534e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fac701369b1197497f7c698ad74386d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#a1fac701369b1197497f7c698ad74386d">minimum</a></td></tr>
<tr class="memdesc:a1fac701369b1197497f7c698ad74386d"><td class="mdescLeft">&#160;</td><td class="mdescRight">minimum output in PID  <a href="struct_p_i_d___structure__t.html#a1fac701369b1197497f7c698ad74386d">More...</a><br /></td></tr>
<tr class="separator:a1fac701369b1197497f7c698ad74386d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51379d672c255e751fb020ef2394a8f0"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#a51379d672c255e751fb020ef2394a8f0">sum_maximum</a></td></tr>
<tr class="memdesc:a51379d672c255e751fb020ef2394a8f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">maximum of anti saturation integral in PID  <a href="struct_p_i_d___structure__t.html#a51379d672c255e751fb020ef2394a8f0">More...</a><br /></td></tr>
<tr class="separator:a51379d672c255e751fb020ef2394a8f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53bf2ded26ca455e1227890c20123cd9"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_i_d___structure__t.html#a53bf2ded26ca455e1227890c20123cd9">last_error</a></td></tr>
<tr class="memdesc:a53bf2ded26ca455e1227890c20123cd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">error value of previous calculation in PID  <a href="struct_p_i_d___structure__t.html#a53bf2ded26ca455e1227890c20123cd9">More...</a><br /></td></tr>
<tr class="separator:a53bf2ded26ca455e1227890c20123cd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >structure of PID algorithm </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00024">24</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="ad0e13a810b1a4602c1ce625f9877cbf5" name="ad0e13a810b1a4602c1ce625f9877cbf5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0e13a810b1a4602c1ce625f9877cbf5">&#9670;&nbsp;</a></span>expect</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float expect</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>user expectations in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00029">29</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="main_8c_source.html#l00029">mdtp_callback_handler()</a>, <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>, <a class="el" href="report_8c_source.html#l00016">report_local_variable()</a>, and <a class="el" href="gd32f1x0__it_8c_source.html#l00136">TIMER13_IRQHandler()</a>.</p>

</div>
</div>
<a id="ae7a5c6018507bb1361fcca170e069b9c" name="ae7a5c6018507bb1361fcca170e069b9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7a5c6018507bb1361fcca170e069b9c">&#9670;&nbsp;</a></span>kd</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float kd</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>differential term coefficient in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00027">27</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="flash_8c_source.html#l00037">flash_read_parameters()</a>, <a class="el" href="flash_8c_source.html#l00017">flash_write_parameters()</a>, <a class="el" href="main_8c_source.html#l00029">mdtp_callback_handler()</a>, <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>, and <a class="el" href="report_8c_source.html#l00016">report_local_variable()</a>.</p>

</div>
</div>
<a id="a050993b7ca6c97e62c1020017f716b91" name="a050993b7ca6c97e62c1020017f716b91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a050993b7ca6c97e62c1020017f716b91">&#9670;&nbsp;</a></span>ki</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float ki</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>integral term coefficient in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00026">26</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="flash_8c_source.html#l00037">flash_read_parameters()</a>, <a class="el" href="flash_8c_source.html#l00017">flash_write_parameters()</a>, <a class="el" href="main_8c_source.html#l00029">mdtp_callback_handler()</a>, <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>, and <a class="el" href="report_8c_source.html#l00016">report_local_variable()</a>.</p>

</div>
</div>
<a id="a1f7add0f84d583bc2eceb290d6c4cc06" name="a1f7add0f84d583bc2eceb290d6c4cc06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f7add0f84d583bc2eceb290d6c4cc06">&#9670;&nbsp;</a></span>kp</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float kp</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>proportional term coefficient in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00025">25</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="flash_8c_source.html#l00037">flash_read_parameters()</a>, <a class="el" href="flash_8c_source.html#l00017">flash_write_parameters()</a>, <a class="el" href="main_8c_source.html#l00029">mdtp_callback_handler()</a>, <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>, and <a class="el" href="report_8c_source.html#l00016">report_local_variable()</a>.</p>

</div>
</div>
<a id="a53bf2ded26ca455e1227890c20123cd9" name="a53bf2ded26ca455e1227890c20123cd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53bf2ded26ca455e1227890c20123cd9">&#9670;&nbsp;</a></span>last_error</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float last_error</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>error value of previous calculation in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00033">33</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>.</p>

</div>
</div>
<a id="a466d4dab1bd38a43438c2e5e6ad5534e" name="a466d4dab1bd38a43438c2e5e6ad5534e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a466d4dab1bd38a43438c2e5e6ad5534e">&#9670;&nbsp;</a></span>maximum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float maximum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>maximum output in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00030">30</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>, and <a class="el" href="pid_8c_source.html#l00034">pid_config()</a>.</p>

</div>
</div>
<a id="a1fac701369b1197497f7c698ad74386d" name="a1fac701369b1197497f7c698ad74386d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fac701369b1197497f7c698ad74386d">&#9670;&nbsp;</a></span>minimum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float minimum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>minimum output in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00031">31</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>, and <a class="el" href="pid_8c_source.html#l00034">pid_config()</a>.</p>

</div>
</div>
<a id="a51379d672c255e751fb020ef2394a8f0" name="a51379d672c255e751fb020ef2394a8f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51379d672c255e751fb020ef2394a8f0">&#9670;&nbsp;</a></span>sum_maximum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sum_maximum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>maximum of anti saturation integral in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00032">32</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="flash_8c_source.html#l00037">flash_read_parameters()</a>, <a class="el" href="flash_8c_source.html#l00017">flash_write_parameters()</a>, <a class="el" href="main_8c_source.html#l00029">mdtp_callback_handler()</a>, <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>, and <a class="el" href="report_8c_source.html#l00016">report_local_variable()</a>.</p>

</div>
</div>
<a id="a5f567aec72ce48f24c2dbc06dcfa3a09" name="a5f567aec72ce48f24c2dbc06dcfa3a09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f567aec72ce48f24c2dbc06dcfa3a09">&#9670;&nbsp;</a></span>summary</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float summary</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>value of integral term in PID </p>

<p class="definition">Definition at line <a class="el" href="pid_8h_source.html#l00028">28</a> of file <a class="el" href="pid_8h_source.html">pid.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="pid_8c_source.html#l00057">pid_calculate_result()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>algorithm/<a class="el" href="pid_8h_source.html">pid.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
</small></address>
</body>
</html>
